use std::{any::Any, fmt::Debug};

use common_base::serde_json;

pub trait DataModel: Debug + Send {
    fn as_any(&self) -> &dyn Any;
    fn as_any_mut(&mut self) -> &mut dyn Any;

    fn into_json_value(&self) -> serde_json::Value;

    fn into_bincode(&self) -> Vec<u8>;
}
